package org.grow.studentscore.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Author: xwg
 * @CreateDate: 21-8-13
 */

@RestControllerAdvice
public class ExceptionBridge {
    @ExceptionHandler(RuntimeException.class)
    public ResponseEntity<String> re(RuntimeException e){
        return  new ResponseEntity<>(e.getMessage(),null,777);
    }
}
